package com.cxz.food.dao;

import com.cxz.food.domain.Food;
import com.cxz.food.domain.FoodCart;
import com.cxz.food.domain.FoodClass;
import com.cxz.food.domain.vo.FoodPlaceResVo;
import com.cxz.food.domain.vo.FoodsResponseVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FoodMapper {

    /**
     * 增加一条Food
     * @param food foodId
     * @return boolean
     */
    Integer addFood(Food food) throws Exception;


    /**
     * 删除一条Food
     * @param id foodId
     * @return boolean
     */
    Integer deleteFoodById(Integer id) throws Exception;


    /**
     * 修改一条Food
     * @param food 要修改的Food
     * @return boolean
     */
    Integer updateFood(Food food) throws Exception;


    FoodsResponseVo findFoodById(Integer id);

    /**
     * 根据business查询该商家下面的所有Food
     * @param businessId 商家id
     * @return List<Food>
     */
    List<Food> getFoodsByBusinessId(Integer businessId) throws Exception;


    /**
     * 根据business查询该商家下面的所有分类
     * @param businessId 商家id
     * @return List<FoodClass>
     */
    List<FoodClass> getFoodClassByBusinessId(Integer businessId) throws Exception;

}
